<extend name="Public/common"/>
<block name="othercss">
<style>
    .vip2_sum.thhh-sum1 .pro-cell{
        padding-left:10px;
		border:0 !important;
    }
</style>
</block>
<block name="header">
<div class="header">
    <div class="clearfix box">
        <!--<a class="save">保存</a>-->
        <a class="return" href="javascript:history.back(-1)"><i class="return-icon"></i></a>
        <h2>退货换货</h2>
    </div>
</div>
</block>
<block name="body">

<!--end header-->
<div class="container pt50">
 
    <div class="thhh-sum1 vip2_sum">
        <div class="no">退款编号：{$model.orderno}</div>
        <!--商品-->
        <a class="pro-cell clearfix">
            <img src="__ROOT__{$model2.goods_picture}"/>
            <div class="lans clearfix">
                <div class="right">
                    <div class="price">¥ {$model2.goods_price}</div>
                    <div class="number">x {$model2.goods_num}</div>
                </div>
                <div class="left">
                    <div class="title twos">{$model2.goods_name}
                    </div>
                    <div class="mess">{$model2.goods_spec}</div>
                </div>
            </div>
        </a>
        <!--表单-->
        <div class="clearfix form" style="text-align:center; padding-top:20px;">
                      <if condition="$model['th_status'] eq 0">
                            <img src="{$theme_path}/images/cancel.png" width="55" height="55"/>
                            <div class="right2">退款已取消</div>
                            <elseif condition="$model['th_status'] eq 1" />
                            <img src="{$theme_path}/images/sq1.jpg" width="55" height="55"/>
                            <div class="right2">退款申请处理中....</div>
                            <div class="right3">我们正在审核您的退款申请，请您耐心等候！谢谢！</div>
                            <elseif condition="$model['th_status'] eq 2" />
                             <img src="{$theme_path}/images/finish.png" width="55" height="55"/>
                              <div class="right2">退款成功</div>
                             <elseif condition="$model['th_status'] eq 3" /> 
                                <div class="img"><img src="{$theme_path}/images/sq2.jpg"></div>
                             
                               <div class="right2">审核通过....</div>
                                <if condition="$model['shouhuo'] eq '已收到货'">
                                 {:$model['kuaidi_no']?'<div class="right3">我们会在收到退货的第一时间完成退款，请耐心等待</div>':''}
                             <form name="frm1" id="frm1" onSubmit="return false;" method="post">
                              <dl class="right4">
                                <dd>快递公司：
                               <input type="text" class="input1"  name="kuaidi" id="kuaidi" value="{$model.kuaidi}"/>
                                </dd>
                                <dd>快递单号：<input type="text" class="input1"  name="kuaidi_no" id="kuaidi_no" value="{$model.kuaidi_no}"/></dd>
                                 <input type="hidden" name="id" id="id" value="{$model.id}" />
                                <dd>
                                   <div class="form">
                         <a class="sub-btn" onclick="tuihuan_kuaidi_submit();" >提交</a>
                                </div>
                                </dd>
                            </dl>
                               </form>  
                                 </if>
                               <elseif condition="$model['th_status'] eq 4" /> 
                              <img src="{$theme_path}/images/no_pass.png" width="55" height="55"/>
                             <div class="right2">审核不通过</div>
                              <else/>
                              <img src="{$theme_path}/images/sq1.jpg" width="55" height="55"/>
                              <div class="right2">退款申请处理中....</div>
                              <div class="right3">我们正在审核您的退款申请，请您耐心等候！谢谢！</div>
                              
                              </if>
           
           
        </div>
        
        
        <input type="hidden" name="cart_id" id="cart_id" value="{$model.id}" />
     
    </div>
  
</div>

</block>
<block name="otherjs">
<script type="text/javascript">
	
	
/*****添加留言******/
function tuihuan_kuaidi_submit() {
    var kuaidi = $.trim($("#kuaidi").val());
	var kuaidi_no = $.trim($("#kuaidi_no").val());

	if (kuaidi == "") {
	
		 layer.tips('请填写快递名称', '#kuaidi',{ time: 1000, tips: [2,'#282828'] });
        $("#kuaidi").focus();
        return;
    }
	
	if (kuaidi_no == "") {
	  layer.tips('请填写快递单号', '#kuaidi_no',{ time: 1000, tips: [2,'#282828'] });
        $("#kuaidi_no").focus();
        return;
    }
		

	var index = layer.load(0, {shade: [0.5,'#999'] }); //0代表加载的风格，支持0-
    $.ajax({
        url: "{:U('Member/kuaidi_submit')}",
        data: $("#frm1").serialize(),
        cache: false,
        type: "POST",
        success: function (obj) {
            if (obj.title == 'success') {
			 layer.closeAll('loading');
			layer.alert(obj.msg, function(index){
              window.location.href="{:urlrotue('Member/tuihuan')}";
              layer.close(index);
              });   
               
            }
            else {
				 layer.closeAll('loading');
				layer.msg(obj.msg, {icon: 5}); 
            }
        },
        error: function () {
			 layer.closeAll('loading');
			layer.msg('提交出现错误！', {icon: 5}); 
        }
    });
  
}



    </script>

</block>
